package com.sam4cloud.common.core.exception;

import lombok.Data;

/**
 * @Author: Sam
 * @Date: 2022/11/10 10:55
 * @Description: API 业务异常类
 */
@Data
public class ApiException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private int code;

    private String msg;

    public ApiException(String msg) {
        super(msg);

    }

    public ApiException(int code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;

    }

    public ApiException(int code, String msg, Throwable cause) {
        super(msg, cause);
        this.code = code;
        this.msg = msg;
    }

}
